package com.hnyfkj.jyindustry.biz.login.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hnyfkj.jyindustry.biz.login.dao.LoginDao;
import com.hnyfkj.jyindustry.biz.login.service.LoginService;
import com.hnyfkj.jyindustry.biz.sysmemberinfo.entity.SysMemberInfoEntity;
import com.hnyfkj.jyindustry.biz.sysmenu.entity.SysMenuEntity;
import com.hnyfkj.jyindustry.biz.sysrole.entity.SysRoleEntity;
import com.hnyfkj.jyindustry.common.utils.ShiroUtils;

/**
 * @author zjq
 *
 * @Description
 *
 * @date 2020年12月9日
 */
@Service
public class LoginServiceImpl implements LoginService{

	@Autowired
    private LoginDao loginDao;
	
	@Override
	public SysMemberInfoEntity getMemberInfoByName(String MemberInfoName) {		
		return loginDao.getMemberInfoByName(MemberInfoName);
	}

	@Override
	public SysMemberInfoEntity getSysRoleById(String id) {		
		return loginDao.getSysRoleById(id);
	}

	@Override
	public List<SysRoleEntity> getSysRoles() {	
		return loginDao.getSysRoles(((SysMemberInfoEntity)ShiroUtils.getSessionAttribute("sysMemberInfoEntity")).getMemberId());
	}

	@Override
	public List<SysMenuEntity> getFullMenuUrl() {		
		return loginDao.getFullMenuUrl(((SysMemberInfoEntity)ShiroUtils.getSessionAttribute("sysMemberInfoEntity")).getMemberId());
	}

}
